<!--
/*
*All rights reserved: Json.
*Links:http://www.liyaoquan.cn.
*Links:http://imarkchina.cn.
*Links:http://www.imarkchina.cn.
*/
-->
{A('public/tools')}
<script type="text/javascript" src="{$__TPL__}Public/Js/jquery.min.js"></script>
<script type="text/javascript" src="{$__TPL__}Public/Js/jquery.Msg.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{$__TPL__}Public/Css/pinglun.css"/>
<style type="text/css">
	.textarea {
		margin: 0px;
		width: 706px;
		height: 127px;
	}
	#abc {text-align: center;}
	.user-name { font-size:14px; font-weight:bold;color:#DE4C1C }
	.ds-post-main {position:relative;margin-bottom:30px; }
	.ds-comment-body {z-index:1;position:relative;left:0;background: #F0F0E3;padding:15px 15px 15px 6px;color:#696A52; border-radius:5px; box-shadow:0 1px 2px rgba(0,0,0,.15), 0 1px 0 rgba(255,255,255,.75) inset;}
	#ds-thread #ds-reset .ds-comment-header {padding-top: 1px}
</style>
<div class="main-wrap">
	<div class="crumb-wrap">
		<div class="crumb-list">
			<span class="crumb-name">评论管理</span>
		</div>
	</div>
	<div class="result-wrap">
		{foreach $pinglun $v}
		<div class="ds-post-main">
			<div class="ds-comment-body">
				<div class="ds-comment-header">
					<div class="user-name">
						{if !empty($v['reusername'])}
						<div class="ref">
							<h4>回复“{$v['reusername']}”的评论</h4>
						</div>
						{/if}
						<h4>昵称：{$v['username']}</h4>
					</div>
				</div>
				<p style="color:blue">&nbsp;&nbsp;&nbsp;{$v['content']}</p>
				<p><font size="1">时间：{$v['date']}/{$v['time']}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日志：<font color="red">{$v['posttitle']}</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="getId({$v['rid']},'{$v['id']}');" style="cursor:pointer;" class="showrepost-{$v['rid']}">回复此评论</a>
					<a onclick="hiderepost({$v['rid']});" class="hiderepost-{$v['rid']}" style="display:none;cursor:pointer;">关闭</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="{U('delpinglun',array('fileid'=>$v['fileid'],'id'=>$v['id']))}">删除</a></font>
				</p>
				<div class="rid-{$v['rid']}"></div>
			</div>
		</div>
		{/foreach}
		<div class="list-page"> {$page}</div>
	</div>
</div>
</div>
<script type="text/javascript">
	function getId(obj,fid){
		$(".rid-" + obj).after('<form action="{U("replay", "add")}" method="post" class="hideforme-' + obj + '"><table class="reply"><tr><td><textarea name="content" id="content" class="textarea" placeholder="请文明用语~！" ></textarea> （<font color="red">*</font>）<br/><span class="emotion"></span></div></td></tr><tr><td colspan="2"><input id="ppid" type="hidden" name="pid" value="' + obj + '"/><input id="id" type="hidden" name="id" value="' + fid + '"/><input  class="inputcsss" type="submit" value="回复"></td></tr></table></form>');
		$(".inputcsss").click(function() {
			var content = $('.textarea').val();
			if (content == '') {
				alert('带（*）号为必填！');
				return false;
			}
		});
		$('.emotion').msG({
				id: 'msg', //表情ID
				assign: 'content', //赋予到具体位置
				path: '{DOMAIN}{ROOT_URL}/Public/Resources/PingLun_Msg/',//表情路径
			});
		$('.hiderepost-' + obj).show();
		$('.showrepost-' + obj).hide();
	}

	function hiderepost(obj){
		$('.hideforme-' + obj).remove();
		$('.hiderepost-' + obj).hide();
		$('.showrepost-' + obj).show();
	}

</script>
</body>
</html>